package com.waiting.InetAddress;

import java.net.InetAddress;

/**
 * @Description
 * @Author bjweitingting
 * @Date 2018/11/15
 **/
public class Main {
    public static void main(String[] args) throws Exception{
        InetAddress localHost = InetAddress.getLocalHost();
        System.out.println(new String(localHost.getAddress()));
        //输出计算机名称
        System.out.println(localHost.getHostName());
    }
}
